package com.easy.neo4j.repository;

import com.easy.neo4j.entry.Rail;
import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.data.neo4j.repository.query.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: CoolPro
 * @Description:
 * @Time: 2024-03-31 22:48
 **/
@Repository
public interface RailRepository extends Neo4jRepository<Rail, Long> {
    @Query("MATCH (n:Rail {name:$parkName})  return n LIMIT 1")
    List<Rail> findRailByName(@Param("parkName") String parkName);
}
